    <div class="main-content">
    	<div class="breadcrumbs" id="breadcrumbs">
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
				$(document).ready(function () {
				    
				 });
			</script>
	
			<ul class="breadcrumb">
				<li>
					<i class="icon-home home-icon"></i>
					<a href="#">系统首页</a>
				</li>
	
				<li>
					<a href="#">活动管理</a>
				</li>
				
				<li class="active">活动通知</li>
			</ul><!-- .breadcrumb -->
		</div>
		
        <!-- Main content -->
    <div class="page-content">
        <div class="page-header">
			<h1>活动通知</h1>
		</div>
        <div class="row">
			<div class="col-xs-12">
			<?php if (validation_errors()!=''){?>
	           <div id="info_msg" class="alert alert-danger"><?php echo validation_errors();?></div>
	        <?php }?>
	                <form id="usrform" role="form" action="<?php echo base_url().'admin/activity/notice';?>" method="post">
	                	
	                	<div class="box-body" style="display: inline-block;width: 100%">
	                        
						
			            
			            
			            <div class="form-group col-xs-6">
				            <label>活动通知名称：</label>
				            <input name="activity_name" type="text" class="form-control" placeholder="输入 ..." value="<?php if (isset($info['activity_name']))echo $info['activity_name'];?>" check-type="required">
			            </div>
                        
                        <div class="form-group col-xs-6">
				            <label>开关</label>
	                            <select name="notice_no" class="form-control" check-type="required">
	                            	<option value="0" <?php if($info['notice_no']==0):?> selected="selected"<?php endif;?>>关</option>
	                            	<option value="1"  <?php if($info['notice_no']==1):?> selected="selected"<?php endif;?>>开</option>
	                            </select>
			            </div>
                        
                        <div class="form-group col-xs-6">
				            <label>分享名称：</label>
				            <input name="share_title" type="text" class="form-control" placeholder="输入 ..." value="<?php if (isset($info['share_title']))echo $info['share_title'];?>" check-type="required">
			            </div>
                        
                        <div class="form-group col-xs-6">
				            <label>跳转地址：</label>
				            <input name="url" type="text" class="form-control" placeholder="输入 ..." value="<?php if (isset($info['url']))echo $info['url'];?>" check-type="required">
			            </div>
                        
                        <div class="form-group col-xs-6">
				            <label>分享描述：</label>
				            <input name="share_desc" type="text" class="form-control" placeholder="输入 ..." value="<?php if (isset($info['share_desc']))echo $info['share_desc'];?>" check-type="required">
			            </div>
                        
			            <div class="col-xs-6">
			            	<table class="table table-striped table-bordered table-hover">
			            		<tr>
                                	<td class="text_rt" style="width: 10%;">
                                		<p>活动图片:</p>
                                		<button id="select" type="button">上传</button>
                                	</td>
                                    <td style="width: 80%;">
                                		<div style="width:40%; margin: auto;">
				  							<input type="hidden" id="url" name="image_url" value="<?php if (isset($info['image_url']))echo $info['image_url'];?>">
				    						<img id="yy_zhizhao" style="width: 100%;" src="<?php if (isset($info['image_url'])&&$info['image_url']!=''){echo $info['image_url'];}else {echo base_url().'themes/default/images/photo_icon.png';}?>" />
										</div>
                                   </td>
                                </tr>
			            	</table>
			            </div>
	                	</div><!-- /.box-body -->
	                	<div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9">
							<button id="btnSubmit" class="btn btn-info" type="submit">
								<i class="icon-ok bigger-110"></i>
								保存
							</button>

							&nbsp; &nbsp; &nbsp;
							<a class="btn" href="<?php echo base_url()."admin/gasstation/index"?>">
								<i class="icon-undo bigger-110"></i>
								返回
							</a>
						</div>
					</div>
	                </form>
	        </div>
		</div>
    </div>
</div>
<script type="text/javascript">
$("#usrform").validation();
//保存
$("#btnSubmit").on('click',function(event){
  // 2.最后要调用 valid()方法。
  if ($("#usrform").valid()==false){
    return false;
  }
});
</script>
<script>
	$(function () {
        var uploader = null;
        //上传初始化
		if(uploader==null){
        	uploader = WebUploader.create({
        	    // 选完文件后，是否自动上传。
        	    auto: true,
        	    //不压缩图像
        	    compress:false,
        	    // swf文件路径
        	    swf:'<?php echo base_url()?>themes/webuploader/Uploader.swf',
        	    // 文件接收服务端。
        	    server: '<?php echo site_url("admin/upyun/webuploader")?>',
        	    // 选择文件的按钮。可选。
        	    // 内部根据当前运行是创建，可能是input元素，也可能是flash.
        	    pick: '#select',
        	    // 只允许选择图片文件。
        	    accept: {
        	        title: 'Images',
        	        extensions: 'gif,jpg,jpeg,bmp,png',
        	        mimeTypes: 'image/*'
        	    }
        	});
        	//文件上传成功，显示图片。
        	uploader.on('uploadSuccess', function(file,response) {
        		$('#yy_zhizhao').attr('src',response.file_path);
        		uploader.reset();
        		$('#url').val(response.file_path);
        	});

        	// 文件上传失败，显示上传出错。
        	uploader.on( 'uploadError', function( file ) {
        		$('#error').html('上传失败');
        		$('#error').show();
        	});
		}
    });
    </script>